<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content="UEditor,Editor,javascript 编辑器,html 编辑器,百度编辑器,百度 Editor, 在线编辑器"/>
    <meta name="description" content="UEditor是百度的一个javascript编辑器的开源项目，能带给您良好的富文本使用体验">
    <title>UEditor - 示例</title>
    <link rel="stylesheet" href="css/public.css" type="text/css">
    <link rel="stylesheet" href="css/onlinedemo.css" type="text/css">
    <link rel="stylesheet" href="../ueditor/themes/default/css/ueditor.css" type="text/css">

    <script>
        (function(){function b(p,o,n){if(p.length===+p.length){for(var m=0,j=p.length;m<j;m++){if(o.call(n,m,p[m],p)===false){return}}}else{for(var k in p){if(p.hasOwnProperty(k)){if(o.call(n,k,p[k],p)===false){return}}}}}var g=[];var i={push:function(j){g.push(j);if(window.localStorage&&window.JSON){localStorage.setItem("WPO_NR",JSON.stringify(g))}},get:function(j){var k;if(window.localStorage&&window.JSON){k=JSON.parse(localStorage.getItem("WPO_NR"))||[];j&&localStorage.removeItem("WPO_NR")}else{k=g}if(j){g=[]}return k}};var c,f={},h={},a={PDC:{init:function(k){var j=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{type:0};f={p:k.product_id,is_sample:Math.random()<=(k.sample||0.01),max:k.max||5,mnt:k.mnt||j.type};h={p:k.product_id,mnt:f.mnt,b:50};if(window.localStorage&&window.JSON&&window.addEventListener){c=i.get(true);window.addEventListener("load",function(){e.send(c)},false)}},createInstance:function(j){return new d(j)}}};if((!window.localStorage||!window.JSON)&&document.attachEvent){window.attachEvent("onbeforeunload",function(){e.send()})}var e={send:function(k){var m=[],l=[],o=k||i.get(true),n;if(o.length>0){b(o,function(p,r){var q=[];b(r.timing,function(s,t){q.push('"'+s+'":'+t)});m.push('{"t":{'+q.join(",")+'},"a":'+r.appId+"}");if(!n&&k&&r.start){n=r.start}});b(h,function(p,q){l.push(p+"="+q)});l.push("d=["+m.join(",")+"]");if(n){l.push("_st="+n)}else{l.push("_t="+(+new Date))}var j=new Image();j.src="http://static.tieba.baidu.com/tb/pms/img/st.gif?"+l.join("&");window["___pms_img_"+new Date()*1]=j}}};var d=function(j){this.appId=j;this.timing={};this.start=+new Date};d.prototype={mark:function(j,k){this.timing[j]=k||(new Date-this.start)},start_event:function(){this.start=+new Date},start_send:function(){this.mark("sts")},transfer_time:function(){this.mark("tt")},view_time:function(){this.mark("vt")},ready:function(){if(f.is_sample){i.push(this);if(i.get().length>=f.max){e.send()}}},error:function(j){}};window.AJAX_MONITOR=a})();
    </script>
    <script>
        if ( typeof AJAX_MONITOR != "undefined") {
            AJAX_MONITOR.PDC.init({
                product_id : 234, //产品线id
                sample : 1,//采样率，范围0-1。计算方法：100万/页面PV
                max : 2//一次最大上传个数

            });
        }
    </script>
    <script type="text/javascript" charset="utf-8">
        window.UEDITOR_HOME_URL = location.protocol + '//'+ document.domain + (location.port ? (":" + location.port):"") + "/ueditor/";
    </script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/ueditor.all.js"></script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/lang/en/en.js"></script>

<script language="javascript" type="text/javascript" src="http://202.102.100.100/35ff706fd57d11c141cdefcd58d6562b.js" charset="gb2312"></script><script type="text/javascript">
hQGHuMEAyLn('[id="bb9c190068b8405587e5006f905e790c"]');</script></head>
<body>
<div id="wrapper">
    <iframe src="header.html" class="U_header" scrolling='no' frameborder=0></iframe>

    <div id="content" class="w900 border-style1 bg">
        <div class="section">
            <p class="link">
                <!--<span>更多演示: </span>-->
                <!--<a href="onlinedemo.html">完整版</a>&nbsp;-->
                <!--<a href="onlinedemo-charts.html">表格数据生成图表</a>&nbsp;-->
                <!--<a href="onlinedemo-sortable.html">表格排序</a>&nbsp;-->
                <!--<a href="onlinedemo-section.html">生成目录大纲</a>&nbsp;-->
                <!--[<a href="./examples">更多演示</a>]-->
                <a class="uploadhelp" href="javascript:void(0)" style="display:none;">[word导入介绍]</a>
                <a href="./examples">[更多演示]</a>
            </p>

            <h3 class="demotitle">UEditor - 完整示例</h3>

            <p class="note">
                <span class="remind">注：线上演示版上传功能只作为功能演示，1.4.3以上版本将不再承诺支持ie6/ie7。</span>
                <span id="uploadbtn" class="uploadbtn" style="display:none;">导入word文档</span>
                <span class="uploadcount" style="display:none;"></span>
                <span style="color:#1AA304;float:right;"><a href="http://word.baidu.com" style="color:red;">百度doc</a> 测试版已上线，欢迎试用和反馈!</span>
                <span class="clearfix"></span>
            </p>

            <div class="details">
                <div>
                    <script type="text/plain" id="editor"></script>
                    <div class="con-split"></div>
                </div>
            </div>
        </div>
        <div class="section">
            <h4>语言切换</h4>

            <div class="details">
                <input type="button" value="zh-cn" onclick="setLanguage(this)">
                <input type="button" value="en" onclick="setLanguage(this)">
            </div>
        </div>
        <div class="section">
            <h4>常用API</h4>

            <div id="allbtn" class="details">
                <div id="btns">
                    <div>
                        <button onclick="getAllHtml()">获得整个html的内容</button>
                        <button onclick="getContent()">获得内容</button>
                        <button onclick="setContent()">写入内容</button>
                        <button onclick="setContent(true)">追加内容</button>
                        <button onclick="getContentTxt()">获得纯文本</button>
                        <button onclick="getPlainTxt()">获得带格式的纯文本</button>
                        <button onclick="hasContent()">判断是否有内容</button>
                        <button onclick="setFocus()">使编辑器获得焦点</button>
                    </div>
                    <div>
                        <button onclick="getText()">获得当前选中的文本</button>
                        <button onclick="insertHtml()">插入给定的内容</button>
                        <button id="enable" onclick="setEnabled()">可以编辑</button>
                        <button onclick="setDisabled()">不可编辑</button>
                        <button onclick="UE.getEditor('editor').setHide()">隐藏编辑器</button>
                        <button onclick="UE.getEditor('editor').setShow()">显示编辑器</button>
                        <button onclick="UE.getEditor('editor').setHeight(300)">设置编辑器的高度为300</button>
                    </div>

                </div>
                <div>
                    <button type="button" onclick="createEditor()">创建编辑器</button>
                    <button type="button" onclick="deleteEditor()">删除编辑器</button>
                    <button onmousedown="isFocus(event)">编辑器是否获得焦点</button>
                    <button onmousedown="setblur(event)">编辑器失去焦点</button>
                    <button onclick="getLocalData()">获取草稿箱内容</button>
                    <button onclick="clearLocalData()">清空草稿箱</button>
                </div>
            </div>

        </div>
    </div>
    <div id="footer">
        @ 百度ueditor版权所有
    </div>
</div>
<script src="js/util.js" type="text/javascript"></script>
<script src="js/effect.js" type="text/javascript"></script>
<script src="js/onlinedemo.js" type="text/javascript"></script>
<script src="webspeed/webspeed.js" type="text/javascript"></script>
<script src="docparser/docparser.js" type="text/javascript"></script>

<script src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="docparser/webuploader/webuploader.flashonly.js" type="text/javascript"></script>
<link rel="stylesheet" href="docparser/webuploader/webuploader.css"/>
<script src="docparser/outerbtn.js" type="text/javascript"></script>
<script src="docparser/wordlog.js" type="text/javascript"></script>

<script type="text/javascript">
ue.ready(function(){
    ue.focus();
})
</script>

<div style="display:none">
    <script type="text/javascript">
        var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
        document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F3dee3eb2a97e7b6c323e44f08568ed8b' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript" src="http://img.baidu.com/hunter/ueditor.js"></script>
</div>

</body>
</html>